﻿@model OSBLE.Models.RegisterModel

@using OSBLE.Models

@{
    Layout = "~/Views/Shared/_LogOn.cshtml";
    ViewBag.Title = "Register";
}

<h2>Create a New Account @Helpers.CreateToolTip(ToolTips.AccountRegisterLogin) </h2>

<!--
    <p>Use the form below to create a new account.</p>
    <p>Passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length.</p>
-->

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <div>

        <h3>Login Information</h3>

        <div class="editor-label">
            @Html.LabelFor(m => m.Email)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.Email)<br />
            @Html.ValidationMessageFor(m => m.Email)
        </div>
        <div class="editor-label">
            @Html.LabelFor(m => m.ConfirmEmail)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.ConfirmEmail)<br />
            @Html.ValidationMessageFor(m => m.ConfirmEmail)
        </div>
        <div class="editor-label">
            @Html.LabelFor(m => m.Password)
        </div>
        <div class="editor-field">
            @Html.PasswordFor(m => m.Password)<br />
            @Html.ValidationMessageFor(m => m.Password)
        </div>
        <div class="editor-label">
            @Html.LabelFor(m => m.ConfirmPassword)
        </div>
        <div class="editor-field">
            @Html.PasswordFor(m => m.ConfirmPassword)<br />
            @Html.ValidationMessageFor(m => m.ConfirmPassword)
        </div>


        <h3>Identification</h3>

        <div class="editor-label">
            @Html.LabelFor(m => m.FirstName)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.FirstName)<br />
            @Html.ValidationMessageFor(m => m.FirstName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(m => m.LastName)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.LastName)<br />
            @Html.ValidationMessageFor(m => m.LastName)
        </div>
<!-- <h3>School/Organization</h3> -->
        <div class="editor-label">
            @Html.LabelFor(model => model.SchoolID)
            <br />  Don't see your school in the list? @Html.ActionLink("Request that it be added", "ContactUs")<br />
        </div>
        <div class="editor-field">
            @try {
                @Html.DropDownList("SchoolID", String.Empty)<br />
            } catch (Exception e) { }
            @Html.ValidationMessageFor(model => model.SchoolID, "You must select a school.")
        </div>

        <div class="editor-label">
            @Html.LabelFor(m => m.Identification)
            @Helpers.CreateToolTip(ToolTips.AccountRegisterID) 
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.Identification)<br />
            @Html.ValidationMessageFor(m => m.Identification)
        </div>
        <div class="editor-label">
            @Html.LabelFor(m => m.ConfirmIdentification)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(m => m.ConfirmIdentification)<br />
            @Html.ValidationMessageFor(m => m.ConfirmIdentification)
        </div>

        <div>
            <!-- recaptcha previously went here --> 
        </div>

        <p>
            <input type="submit" value="Register" />
            <!-- style="font-size: 1.2em; padding: 0.25em;" -->
        </p>
    </div>
}
